package Application.UIEditApplication.xmlPrase
{
	import Application.UIEditApplication.def.Manager;
	
	public class ComponentPropertyXML
	{
		private var _data : Object;
		
		public function ComponentPropertyXML()
		{
		}
		
		public function prase() : void
		{
			_data = new Object;
			
			var orgXML : XML = Manager.Source.getXML("ComponentXMLModel");
			
			for each(var element:XML in orgXML.elements("item"))
			{
				var objInfo : Object = new Object;
				objInfo["id"] = element.@id.toString();
				
				var proStr : String = element.@property.toString();
				var property : Object = new Object;
				
				var lst0 : Array = proStr.split("/");
				for(var i:int=0;i<lst0.length;i++)
				{
					var lst1:Array = lst0[i].split("-")
					property[lst1[0]] = lst1[1].split(",");
				}
				
				objInfo["property"] = property;
				
				_data[objInfo["id"]]=objInfo;
			}
			
		}
		
		public function get Data() : Object
		{
			return _data;
		}
		
		public function  getProperty(id : String) : Object
		{
			return _data[id]["property"];
		}
	}
}